<%@page import="cn.school.servies.*,cn.school.entity.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%!int a=0; %>
<%
request.setCharacterEncoding("utf-8");
int gradeid=Integer.parseInt(request.getParameter("gradeid"));
String name=request.getParameter("name");
long classhour=Long.parseLong(request.getParameter("classhour"));
StudentSerive serive=new StudentSerive();
if(gradeid!=0&&name!=null&&classhour!=0){
	
	Subject s=new Subject();	
	s.setGradeid(gradeid);
	s.setSubjectname(name);
	s.setClasshour(classhour);
	 a=serive.add(s);
}

%>
<%=a %>
</body>
</html>